package com.empire.module.member.dal.mysql.personwarningsummary;

import java.util.*;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.member.dal.dataobject.personwarningsummary.PersonWarningSummaryDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.member.controller.admin.personwarningsummary.vo.*;

/**
 * 人员预警统计汇总 Mapper
 *
 * @author 主席大人
 */
@Mapper
public interface PersonWarningSummaryMapper extends BaseMapperX<PersonWarningSummaryDO> {

    default PageResult<PersonWarningSummaryDO> selectPage(PersonWarningSummaryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PersonWarningSummaryDO>()
                .eqIfPresent(PersonWarningSummaryDO::getTotalWarnCount, reqVO.getTotalWarnCount())
                .eqIfPresent(PersonWarningSummaryDO::getIndividualCount, reqVO.getIndividualCount())
                .eqIfPresent(PersonWarningSummaryDO::getGatherCount, reqVO.getGatherCount())
                .orderByDesc(PersonWarningSummaryDO::getId));
    }

}